# Copyright (c) 2021 by Michael Zahniser
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

mission "Sad Gamblers - Republic"
	minor
	source
		government "Republic"
		attributes "near earth"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`Passing through the spaceport you see a sizable group of people waiting on a lottery draw. You hear a whoop of success, and your attention is drawn as one of them wins a moderate sum in a 12th division win. It's one or two days' worth of standard pay.`
			`	It's difficult not to pity them as they immediately buy more tickets with the whole value.`
				decline

mission "Sad Gamblers - Syndicate"
	minor
	source
		government "Syndicate"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`Passing through the spaceport you see a sizable group of people waiting on a lottery draw. You hear a whoop of success, and your attention is drawn as one of them wins a moderate sum in a 12th division win. It's one or two days' worth of standard pay.`
			`	It's difficult not to pity them as they immediately buy more tickets with the whole value.`
				decline



mission "Foiled Kidnapping Witnessed"
	minor
	source
		government "Syndicate"
		not attributes "station" "frontier" "urban"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`A roadblock interrupts your path as you make your way towards the city, forcing you to slow down as you pass by, able to see what the commotion is about. Police wave past car after car coming from the other direction, looking into the vehicles until one gets pulled over to the side, causing police to briefly halt all traffic movements. The driver seems distressed, refusing to open the back even when he is being detained; his face goes pale when a little girl is found inside.`
			`	You're not sure how to feel about this when the police wave you off, blocking your view from the scene.`
				decline



mission "Gift Store Interaction"
	minor
	source
		government "Republic"
		attributes "deep"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`As you wander the spaceport with a snack, waiting for your ship to be refueled, you pass a local souvenir shop and poke your head in to kill a little time. You see a decent looking mug with the text "Peace, Prosperity, Progress" printed underneath the insignia of the Deep and pick it up to see how it feels. The handle is solid, not too small for your fingers, and the lip of it looks like it would be comfortable to drink out of.`
			`	Two young adults wander into the aisle just a couple of meters away, conversing in a language that you don't understand, one that is perhaps local to the Deep. They're cooing over an item they've found, but when one flips it over to look at the price tag, there is an immediate exchange of looks and expressions that does not require translation. The item ends up back on the shelf with a giggle and a headshake.`
			branch broke
				credits < 50
			`	Curious, you turn over your own mug and see that it is indeed at least five times what you would expect to pay for a mug, even a good one: 50 credits. Still, it is certainly a novelty...`
			choice
				`	(Buy the mug.)`
					goto buy
				`	(Put it back.)`
			`	You roll your eyes and put it back. Some experiences really are universal.`
				decline
			
			label buy
			action
				payment -50
				outfit "Mug"
			`	You purchase the mug on an impulse. At least you can ditch your other one with a chip in it.`
				decline
			
			label broke
			`	Curious, you turn over your own mug, and when you spot the 50 credit price tag your heart sinks. You could never afford such an expensive mug. You put it back and walk away while pondering your financial situation.`
				decline



mission "New China Mourners"
	minor
	source "New China"
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`The skies pour down onto the world below, weeping together with the crowds as a plain but stately coffin is carried slowly from a void deck. Rhythmic wailing blends with the susurrant rain, filling the air as the coffin is followed closely by procession of mourners that look to be an extensive gathering of family. Even as it is placed into the van they do not leave the departed, a number of their hands placed on it as if pushing the person toward their final resting place. The two foremost mourners, a woman and a young man, climb in and take their seats next to it. Somewhere nearby, music begins to play as the vehicle slowly moves off.`
			`	You wonder how well known the person was before they died as those remaining finally turn away from the van receding into the distance and begin to file past some discreet attendants you hadn't noticed at first, accepting slippers for their bare feet before boarding the buses waiting to take them after the van.`
				decline



mission "New Holland Foibles"
	minor
	source "New Holland"
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`The smell of burning metal fills the air as you walk down the uncrowded streets of the factory town near the spaceport, keeping away from the arterial supply route directly feeding the port and its hangars.`
			`	Despite the distance and absent traffic though, it is far from quiet. Several factory buildings make discernible thrumming noises, and grinders echo amidst the silence as you investigate. Turning a corner, you come across an alley running along a lengthy chain link fence line. Beyond it, you can see a throng of men cutting away at a spaceship. Parts regularly fall to the floor, the workers apparently heedless of those below.`
			`	Even as you watch you see a hull plate swinging dangerously above a workers head.`
			choice
				`	(Call out a warning.)`
				`	(Leave them be.)`
					goto leave
			`	You call out a warning and most of the men pause to look at you, the hull plate swinging gently as the holder of the offending grinder squints in your direction. One of the older men, who you now realize was at least somewhat overseeing the activity, steps forward and flicks his hands at you in a shooing motion. "Oi you, piss off. We've got our safety supervisor, we don't need your nose in our business."`
			choice
				`	(Challenge the claim.)`
				`	(Leave them be.)`
					goto leave
			`	You point out that what you were seeing did not look at all safe, supervised or not, and the man glances around briefly before huffily making his way over to stand opposite you behind the fence. "Look stranger," he says, "work here is hard to find. For those working here, we don't have the time to spare. But the pay is good and we can at least feed our kids. Sure, some people get a few scrapes and bruises, but no one has died on my watch, and Rik only lost his smallest finger. If you feel the need to watch then fine, stand around, but leave us be, okay? There ain't no one around here that'll care what you have to say anyway."`
			`	He looks you dead in the eyes, and once he is sure you understand his message he stomps back over to his crew, who continue their work. You watch them cut the dead ship apart until its pieces completely fill the trailer they have with them, before they proceed to haul the parts away to a factory in the distance.`
				decline
			label leave
			`	You turn and depart. A moment later you hear a clatter and a shout, but when you look back no one appears to have been injured.`
				decline



mission "Trash Fire Crops"
	minor
	source
		government "Republic"
		attributes "dirt belt"
		attributes "farming"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		"bumper crop year" = "year"
		conversation
			`As you move about the spaceport, you can't avoid the terrible smell. It's like a trash fire, but you can't see any sort of smoke.`
			choice
				`	(Ignore it.)`
					goto ignore
				`	(Ask around.)`
			`	You ask one of the locals who doesn't look too busy. They sadly inform you that there's been a bumper banana crop, but unfortunately other wealthier worlds had a bumper crop at the same time, and there's nowhere to either sell or store a significant excess. Distressed farmers are burning the excess fruit to make fertilizer for the next season, the wind has carried the smell all over town.`
				decline
			label ignore
			`	You leave the mysterious smell to the locals and continue on your business.`
				decline



mission "Worker's Occasion"
	minor
	source
		government "Republic"
		attributes "dirt belt"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`Pausing to consider a restaurant for your dinner, you notice a local worker with a small handful of credits eagerly eyeing the menu. His clothes are neatly worn and look freshly brushed, but it's impossible not to notice the dirty marks and stains that haven't washed out. The man undeniably seems nervous, and he looks at the formal dining layout with an obvious lack of familiarity. Looking at the menu yourself, you realize that while the prices are very affordable for you, they would've been unreachable before your career change.`
			choice
				`	(Offer to pay for the man's dinner.)`
					goto aid
				`	(Silently pity the man.)`
					goto pity
				`	(Smile at the man.)`
			`	You smile at the man and reflect on the value of small achievements. He catches your smile out of the corner of his eye and gives you a hesitant but friendly wave back before you go about your business.`
				decline
			label aid
			`	You enter the restaurant and catch the man's attention, offering to pay for his meal.`
			`	He recognizes you as a pilot and frowns, before telling you where you can stick that offer in colorful terms. As you walk away, you think about what your reaction would be if a much wealthier individual pitied you by paying for your dinner.`
				decline
			label pity
			`	You pity the man who has to work a full month to afford this and continue on your way.`
				decline



mission "Paradise Cleaner Incident"
	minor
	source
		government "Republic"
		attributes "paradise"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`Visiting the Paradise spaceports is always an interesting experience for someone from abroad. Nowhere else is class such an ingrained component of daily life. You find yourself noticing people who seem to be invisible to most of those going about their business, but they never catch your eye. They always appear to be doing their utmost to avoid notice.`
			`	You haven't noticed children that look poor here in the past, but on this occasion you spot one as he knocks over a mop and bucket... right in front of a businessman and his family rolling their bags through the spaceport. You've never seen someone go so deathly pale as the cleaner, the boy's mother, who scurries to fix things before the man even draws a breath.`
			`	A pair of security officers appear almost immediately, before you could intercede one way or the other, as the man and his family begin to complain. One officer provides assurances as the other supervises the cleaner, who quickly hurries her child out of harm's way.`
				decline



mission "Curious Waiter"
	minor
	source
		government "Syndicate"
		attributes "factory"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`On a whim, you decide to dine in at a restaurant well clear of the busy spaceport. You swiftly find yourself searching up a list of delicacies on a physical menu as people stream past the window by your booth, each looking drained from the long work day. Meal soon ordered, you continue watching the crowd until it arrives, a local version of a katsu don and dig in.`
			`	The place is quiet, perhaps a little early for the dinner rush yet, and you are halfway through your meal when a waiter stops beside you, coughing to catch your attention.`
			choice
				`	"May I help you?"`
				`	"Yes?"`
				`	"What do you want?"`
			`	"Sorry," he says, grabbing the edges of his shirt. "But... may I ask... what's it like to see the stars? To visit other worlds?"`
			choice
				`	"Most worlds are the same or worse than here."`
				`	"The stars are prettier under an atmosphere."`
				`	"It's an adventure, but not for the faint of heart."`
			`	"Oh... I've never seen any pilots, so I never got to ask," he says, slightly dejected. "Thank you very much for telling me though!"`
			`	He goes back to his work, with a thoughtful expression of neutral satisfaction on his face.`
				decline



mission "Syndicated Security Troops"
	minor
	source
		government "Syndicate"
		attributes "urban"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`The low rumble of "Tonners," heavy trucks for moving troops and supplies, rolling down the street causes heads to turn and look at the blocky yet imposing vehicles slowing to a stop. The driver and the commander of the foremost vehicle have their eyes on the road, watching out for any traffic hazards that might pose a risk to either the vehicle or their support.`
			`	The troops within the back of each tonner, on the other hand, are making small talk, the camo on their face smearing off in the heat. One of them points at you, saying something that garners him a groan from his peers, and you decided that you probably don't want to know what he said.`
				decline



mission "Class Trip to Port"
	minor
	source
		attributes "south"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`A group of children waves at you as you step off your ship, marveling at the spacecraft on display as their teachers try and fail to hold their attention. You can see the fading of their uniform colors from afar as their group walks past, yet none of them look one bit displeased. While you make your way into the spaceport itself, you wonder how many of them may eventually own their own spaceship and fly across the stars.`
				decline



mission "Old Defense Turrets"
	minor
	source
		attributes "south"
		not attributes "station" "frontier"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`With an annoyingly long stopover having encouraged you to do a little exploring, you rent a car for a short drive around the immediate area. Later, as you pull the car into the designated return parking lot, the unexpected sound of large hydraulic motors draws your attention. You watch as a massive turret lifts up from behind a nearby barricade and turns toward the sky, its single cannon poised to fire at seemingly nothing.`
			`	Looking around for some form of explanation you find a plaque placed conveniently nearby dedicating the turret, and five others like it, offering protection and discouraging piracy until relatively recent years. You can't help but wonder how well the turrets would do if they were to be actually used again.`
				decline



mission "Blind Landing"
	minor
	landing
	source
		government "Free Worlds"
		attributes "farming"
		not attributes "station" "frontier"
	"offer precedence" 5
	to offer
		"year" > "bumper crop year" + 2
		random < 1
		has "Trash Fire Crops: declined"
	on offer
		conversation
			`Smog fills your windscreen as you make your descent, trying and failing to see anything more than a few meters in front of you. The autopilot systems show solid green across the full range of indicators though, and traffic control has confirmed a lock.`
			choice
				`	(Land on autopilot.)`
				`	(Return to orbit.)`
					goto orbit
			`	You let the craft perform the landing, staring blankly at the haze until it clears.`
			`	On the ground, you see the cause, fields upon fields of plantations burning. You see a crowd of mostly farmers blocking off a smaller group of firefighters, arguing and trying to stop them from putting out the flames as planes fly overhead, dropping water and retardants wherever necessary.`
			`	You recall seeing something like this years ago, of farmers burning their crops to make the land fertile, and how bad the air was for months.`
				decline
			label orbit
			`	Unwilling to trust landing blind into an unknown situation, you return to orbit and rejoin the spaceport processing queue. One day of delay is a worthwhile price to pay for surety.`
				flee



mission "Forest Fire"
	minor
	source
		government "Free Worlds"
		attributes "frontier"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`The smell of burning smoke permeates the air as you step off your craft, causing you to rush towards the nearest shelter, coughing along the way. Once there, you find people shouting and rushing about to get tape plastered onto the windows. No one seems to have noticed your arrival and none give an explanation.`
			choice
				`	"Hey! What's happening? I can help!"`
					goto help
				`	(Look for someone not in motion.)`
			`	You seek out a pregnant lady sitting on a chair, a mask worn as she explains: "A large fire has sprung up nearby, and the wind is fanning it towards the spaceport. Might have been some fool playing with fire, or some pirate sending a message to a local. We don't know, could be anything around here really. We're hunkering down and hoping it'll burn out before it does too much damage."`
			choice
				`	"I have a ship out there. Let me help."`
			`	Her eyes widen and she looks around, sharply catching the attention of one of the many people hurrying about.`
				goto fight
			label help
			`	A young man who looks suspiciously like he might've been air traffic control twenty minutes ago glances at you and skids to a stop. "Oh, you're a pilot! Can your ship help?"`
			choice
				`	"Yes."`
			label fight
			`	The dock-hands scramble to get the firefighting equipment onto your ship after your proclamation, instructing you to drop the retardants onto the perimeter of the fire. You barely manage to remember what every button does before the Air Traffic Controller clears you to depart, navigating your craft towards the fire.`
			`	The raging fire flares like an inferno, throwing up black smoke in deep billowing waves as you approach. As you drop the retardants, making sure to keep your speed low, animals scramble towards safer grounds. You try to make sure you've not emptied right on top of them each time as you go back for another batch.`
			`	Hours later, you look at your handiwork, a long line of red keeping back the flames as the fire starts to smother out. You radio your progress and receive a cheery response, thanking you for your help.`
				decline



mission "Local Politics"
	minor
	source
		attributes "frontier"
		attributes "south"
		not attributes "station" "urban" "ex-pirate"
	"offer precedence" 5
	to offer
		or
			and
				random < 5
				or
					has "flagship planet attribute: south pirate"
					not "event: war begins"
			and
				random < 1
				has "event: war begins"
				not "event: fw suppressed Greenrock"
	on offer
		conversation
			`As you land on the pad, you note a general lack of presence around the spaceport. No one has scrambled to hook up your ship, nor has anybody else acknowledged your arrival. Instead, when you leave your ship, all you find is a note within the spaceport detailing where their "overlords" can find their yearly tribute.`
			`	You decide against finding out where the inhabitants went.`
				decline



mission "Military Response Test"
	landing
	minor
	source
		government "Free Worlds"
		not attributes "station" "urban" "frontier"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`In a strange set of instructions, the Air Traffic Controller has you punch in a set of coordinates, taking you close to a massive military base on the way to the landing zone. You let the autopilot take over as you watch the view off the cockpit window, hoping the turrets in the base won't shoot you out of the sky.`
			`	From where you are watching, you see a single woman standing within the parade square, a hand raised like she's looking at her watch. Seconds pass before she raises her other hand and gives a thumbs up to whoever's looking at her. Suddenly, a loud siren sounds out across the base that is audible even in your ship as it passes by at reasonable height. You watch as soldiers drop everything they're doing, some rushing into buildings while others run toward armored vehicles. Within minutes, the base's vehicles are rolling towards the parade square whilst soldiers in full gear run to assemble within the square in neat rows.`
			`	You aren't sure whether what they were doing was scheduled, or if it was in response to your flight.`
				decline



mission "Missed Mugging"
	minor
	source
		government "Free Worlds"
		not attributes "station" "frontier"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`The sun has already set when you walk out of the spaceport, trying to find a nearby restaurant to sample their wares. Looking around, the only source of light comes from the building you just exited, a beacon within the sea of darkness.`
			`	Choosing a random direction, you decide to walk down the quiet street, taking in the sights. You are interrupted as two men rush from an alley, pushing past you as they go. Before you can respond, you see a woman run out, clothes in disarray as she gives chase to the two men to no avail. Belatedly, you realize that they were holding a purse, long after they've disappeared, melting into the blackness beyond.`
				decline



mission "Sojourn Sunday Sales"
	minor
	source
		government "Free Worlds"
		attributes "urban"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`You blink in surprise as you enter the spaceport, watching throngs of people pushing their way through the human chains of queues wrapped around the commercial area. You scan your surroundings and notice advertisements upon advertisements of vacation locations, all at an absurdly high discount. Yet despite their vastly reduced prices, the advertised holidays still cost such large sums that a younger you could never have justified such expense.`
				decline



mission "Tarazed Ship Christening"
	minor
	source "Wayfarer"
	to offer
		random < 10
		has "main plot completed"
	"offer precedence" 5
	on offer
		conversation
			`As you walk past a number of ships and crew going about their work in the spaceport, a small gathering in front of a Shuttle catches your attention. A young woman wearing a rather cheesy pilot uniform is in the midst of a little group of people all celebrating together. As you pass by them, a man standing on the top of a ladder breaks a bottle of Champagne on the (clearly not new) ship's hull. A loud cheer erupts from the group, earning an embarrassed blush from the young woman.`
			choice
				`	(Take a closer look.)`
					goto investigate
				`	(Shout well wishes as I pass by.)`
					goto "pass by"
				`	(Ignore them, I have more important things to do.)`
			`	You hurry past the rowdy group, annoyed by the disturbance.`
				decline
			label "pass by"
			`	You hurry past the group as they quiet down. Taking advantage of the momentary lull, you shout "Good luck! You've got this!" toward them. They let out another cheer in response, with the exception of the young woman who buries her face in her hands.`
				decline
			label investigate
			`	You approach the group as they quiet down, noticing a hint of anxiety in the air.`
			`	"Nothing quite like buying your very first starship," you say over their chatter. The celebration goes quiet as they turn to see who interrupted their little party.`
			`	"It's certainly been an... experience," the young woman replies once you are in comfortable talking distance.`
			choice
				`	"Have you got any big plans with it?"`
					goto plans
				`	(Give some advice.)`
					goto advice
				`	"So, who's the lucky pilot?"`
			`	You gesture to the Shuttle and look around as if it should be anyone else.`
			`	"Uhh... that would be me," the woman says, glancing around awkwardly.`
			choice
				`	(Try to salvage the awkward situation.)`
				`	(Get out while I can.)`
					goto "get out"
			`	"I'm just messing with you, my psychiatrist doesn't think it's very funny when I do it to him either."`
			`	"Oh," the woman says quietly, "that's... nice, I guess."`
			label "get out"
			`	You realize that you have made this random young lady quite uncomfortable by barging in with your input.`
			`	"Well, good luck!" you say with a wave as you hurry away. You barely hear the quiet "thank you" over the burning in your ears.`
				decline
			label plans
			`	"Right now," she says with a sigh, "the only plan I have is to get rid of the massive debt that I'm in because of it."`
			label advice
			`	"The mortgage isn't so bad as long as you're willing to work hard," you say with a smile, "and there is no shortage of people in need of a ship and a good pilot."`
			`	"I knew you could make a decent living with one, but is it really that easy?" she asks.`
			`	"The work isn't easy, but finding a job is the least of your worries. I'm sure that you'll have this ship paid off in no time."`
			`	You stay around and talk with the aspiring pilot for a few minutes, giving her tips and advice before stating that you have work to do. As you turn to leave, an older man places his hand on your arm, stopping you.`
			`	"Before you go," the man says, "we weren't very sure about this whole 'pilot' thing at first, but it's good to hear that my little girl has made the right decision. Thank you for that."`
			`	"It's the least I could do," you say before walking away.`
				decline



mission "Masquerade Hanging"
	minor
	source
		government "Pirate"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`The smell of burning gunpowder wafts about in the air as you enter a town square, watching as a body is rolled off of a raised platform. Cries and screams fill the air as a masked man drags a lady across the platform and onto the central dias, an old-fashioned pistol to her head as he asks her something you can't make out. Thankfully, the man doesn't shoot, taking his gun off her temple before subsequently knocking her out with his weapon.`
			`	Moments later the small crowd allows him to depart opposite your viewpoint, without incident and without explanation. You aren't quite sure what to make of this scene as the bodies are swiftly dragged away.`
				decline

mission "News Reporter - Paradise"
	minor
	source
		government "Republic"
		attributes "paradise"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 8
		has "event: war begins"
		not "event: joined the free worlds"
	on offer
		conversation
			`You are passing through the spaceport when you see a young woman walking in your direction. Trailing behind her is a multitude of camera drones, each one marked with a logo consisting of two curves pointing inwards.`
			choice
				`	(Wait for her to approach.)`
					goto walk
				`	(Hope she doesn't notice me.)`
					goto notice
				`	(Try to avoid her.)`
			`	You take a hallway off to the side to evade her. Just as you think you've gotten out of sight, you hear a voice. "Excuse me!" You turn to see the reporter following you.`
				goto walk
			label notice
			`	As you continue walking, you hear her call out, "Excuse me!" Suppressing a sigh, you turn to face the reporter.`
			label walk
			`	As she gets closer to you, she smiles. "Hello Captain! Would you be willing to answer a few questions for our viewers?"`
			choice
				`	"Sure, I wouldn't mind."`
					goto questions
				`	"No, I'd rather not."`
					decline
			label questions
			`	The camera drones circle around you as she prepares for the interview. After a few seconds, she smiles at one of the drones and begins.`
			`	"Welcome back. I'm here on <origin> reporting on the situation with the Free Worlds. I'm joined by a merchant captain currently between trips. Captain, what do you think of the ultimatum sent to Parliament?"`
			choice
				`	"I think Parliament should reconsider and give the situation some thought."`
				`	"Parliament made the right decision by refusing the demands."`
					goto right
			`	The reporter frowns. "Can you explain your answer for our viewers?"`
			choice
				`	"The interests of every world should be considered, whether we agree or not."`
				`	"The Free Worlds aren't represented well enough to gain traction through normal channels."`
				`	"The Navy is hardly defending that territory, so taxes shouldn't be as much."`
				`	"I would prefer to not answer."`
			`	"I'm not sure that Parliament would agree with you, but I want to thank you for your answers, and for taking the time to do this interview!" she says.`
			`	The drones dart back to follow her as she continues through the spaceport.`
				decline
			label right
			`	The reporter smiles. "Can you explain that answer for our viewers?"`
			choice
				`	"There are proper channels for presenting grievances, and this isn't one of them."`
				`	"It's a very ungrateful thing to do when Parliament is the one protecting them."`
				`	"I would prefer to not answer."`
			`	"We are fortunate that many people feel this way! Thank you for your answers, and for taking the time to do this interview!" she says.`
			`	The drones dart back to follow her as she continues through the spaceport.`
				decline

mission "Scientists at the Pub after a Conference"
	minor
	source
		government "Republic"
		attributes "urban"
		not attributes "station"
	"offer precedence" 5
	to offer
		random < 1
	on offer
		conversation
			`As you take a break after a long journey and a longer-feeling landing procedure, you notice a group of people enter the pub where you're sitting, streaming in from the conference complex across the street. They vary in age, dress, and accent, but most have an identical badge dangling from a lanyard around their necks. You notice one badge that's been dropped on the floor, reading "Attendee - 35th Annual Pan-galactic Conference on Interstellar Microbial Genomics and Population Dynamics." The group takes their seats at a long table near to you.`
			choice
				`	(Order a meal and listen in to their conversation.)`
					goto "overheard scientists 1"
				`	(Find somewhere quieter to relax.)`
					decline
			label "overheard scientists 1"
			`	Fragments of conversation make their way to you through the din of the pub.`
			``
			`	Two of the younger attendees are looking a bit nervous. "I'm so glad to have my presentation over with. I was so worried about having to present on the first day, but now I can finally just relax and actually listen to the other talks!"`
			`	"Oh definitely! I probably shouldn't even be here - I should really be rehearsing... Oh! Waiter, another beer, please!"`
			`	"Got your slide deck ready for tomorrow?"`
			`	"Yeah, but I'm still terrified. I hate public speaking."`
			`	"Don't worry, you know more about your particular area of expertise than they do. You'll be fine once you're on stage! And besides, graduate school is one giant exercise in public speaking. Comfort comes with practice."`
			``
			`	Another scientist is rolling his eyes after a post-mortem of the day's events. "Is there some law I don't know about that requires every 'question' to start with 'I guess this isn't so much a question as a comment...'?"`
			``
			`	An exasperated academic is speaking emphatically to her friend about what you infer to be a presentation they both heard earlier. "I don't think the nucleotide evidence supports their hypothesis at all! Like, I know the proteomic data could be used to support their conclusion, but they're ignoring synonymous mutations!"`
			choice
				`	(Order another beverage and continue listening.)`
					goto "overheard scientists 2"
				`	(Finish my meal and leave.)`
					decline
			label "overheard scientists 2"
			`	The group's conversation grows louder by virtue of both passion for the subject as well as the influence of a few drinks.`
			`	"Look, the analysis might be fine, but if they can't even be bothered to provide the version numbers for their analytical software, then it isn't reproducible and that's an automatic 'reject' from me."`
			``
			`	One person is looking slightly shell-shocked after considering what might have been. "Can you believe my computer crashed right before I had to present? Good thing I had backups. Two is one and one is none."`
			``
			`	A group seem to be discussing some other colleagues in the field who are, presumably, not present this evening. "Singh and Esterhazy are such arrogant jerks. Their work is okay, I guess, but not enough to justify their wannabe rockstar personalities!"`
			`	"Sure, but they aren't just arrogant jerks, they're charismatic arrogant jerks. Charisma attracts good grad students to their lab, who produce good papers, who they put their name on. It's a positive feedback loop."`
			``
			`	Grant applications seem to be a common subject. "The Republic Medical Research Agency said my work is too theoretical, but the University of Chiron Department of Microbiology says it's too applied!"`
			`	"That's a conundrum, alright. Maybe you could find some funding from industry? The Syndicate might be interested in your work."`
			`	"Yeah, but I'm not sure yet if I'm willing to give up my academic freedom."`
			choice
				`	(Finish up at my own pace.)`
					goto "overheard scientists 3"
				`	(Settle my bill as quickly as possible and leave.)`
					decline
			label "overheard scientists 3"
			`	Two attendees compare gripes about job demands. "Teaching sucks. Between class hours, office hours, and preparing lectures, there's hardly any time left for research."`
			`	"That's funny! Teaching undergrads is my one respite from grant-writing!"`
			``
			`	A sociable but exhausted-looking man is sitting back in his chair. "These conferences only last three or four days, but it always feels like it ages you a year."`
			`	You leave after finishing your meal, reflecting on having overheard a slice of a life very different from your own.`
				decline


mission "Sol-Bound Shuttle"
	minor
	source
		system "Sol"
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`	Upon entering the sprawling spaceport, you notice that a group of factory workers are talking to a captain. As you get closer, you see that the captain's flagship, a Shuttle that has seen better days, lacks a hyperdrive.`
			choice
				`	"Where's your hyperdrive?"`
				`	"How are you going to travel anywhere with that ship?"`
				`	(Go back to your ship.)`
					decline
			`	The captain laughs. "Most pilots are the adventurous type. Not me. I make a pretty decent haul just flying people from Earth to Mars and back. Occasionally I do trips to the Moon for tourists." You notice that she uses the archaic term for Luna. Must be a local expression.`
			choice
				`	"Doesn't that get boring?"`
					goto boring
				`	"Is there really enough travel within Sol that you can make a living off of it?"`
			`	"You'd be surprised. There's a lot of people in this system after all, and a lot of those people have enough money to leave Earth but not enough to leave Sol. It's a nice niche I've carved out for myself."`
				goto end
			label boring
			`	"For you, maybe. I can tell by your accent that you've done a bit of travelling from your home planet. I like staying closer to home, though. With all the instability in the galaxy - pirates, aliens, and who knows what else - staying in Sol keeps me safe. Call me paranoid, but being in a place where I don't have to worry about that is something I value." She eyes a ship to the side that's having its hull repaired. The damage appears to have been inflicted by a beam weapon.`
			label end
			`	You say your goodbyes as you board your ships. Although you are both captains, the trajectory of your lives have taken very different courses.`
				decline

# Note about Earth Day and Earth Hour:
# Earth Day (in 2023) is a day of awareness about climate change and occurs every 22nd of April. Earth Hour is an hour
# of blackout around cities worldwide, also to bring awareness to climate change, and it's observed on the last Saturday
# of March.

# Since Earth Day has become a quasi-'national day' for Earthlings in Endless Sky, it would be interesting to have Earth
# Hour be conflated with Earth Day as well, to demonstrate how people in a thousand years' time observe what we observe
# today and how its meaning has changed.
mission "Earth Day Blackout"
	minor
	landing
	source "Earth"
	"offer precedence" 5
	to offer
		day == 22
		month == 4
	on offer
		conversation
			`As you follow the tracking beacons towards Earth's central spaceport, you realize there's something very off. What was the bustling spaceport city is now completely still, and even though it is near midnight, the supertall buildings and skyscrapers are curiously dark; not a light is on for kilometers.`
			`	Despite this, the spaceport seems to still be operational, because the automated procedures of signing landing documents, refueling, and checking your ship's spaceworthiness are completed as you land. In the spaceport terminal, there are wax candles spaced out to bring some light into the now dark corridors. It's a strange sight for the most populated planet in human space.`
			choice
				`	(Find someone and ask.)`
				`	(The blackout will probably pass.)`
					goto pass
			branch attendant tourist
				random > 50

			label attendant
			`	You approach an information desk in the terminal's atrium that, given the situation, doesn't seem to be as busy as expected. After a moment you get to the attendant behind the counter.`
			choice
				`	"What's with the blackout?"`
				`	"When is the blackout going to be fixed?"`
			`	The attendant chuckles to himself. "I should've expected that question from your accent. Today's Earth Day, when all the cities of Earth - and I mean all of them - participate in a total blackout. Even the Parliament building was out today. It makes us think about our origins; that we once lived on the soil without electricity, all confined to just this one planet here, divided and uncertain. Of course, people like me still have to keep working, but for other people it's a day off to enjoy what little wildlife and Earth us Earthlings have left, ironically. Do you have any other questions?`
			choice
				`	"When did this tradition start?"`
				`	"Thank you for telling me."`
					goto pass
			`	"Well, my old history class tells me that the first Earth Day was around the 20th century, a few years after we landed on the Moon for the first time. Back then, there were a bunch of conflicts and disputes over resources and how we were fighting all over and digging it all up to power all those dirty, primitive cars, power plants, and factories we had back then. So as a show of unity against that people started celebrating Earth's natural beauty by bringing us back to our past."`
			`	As he finishes, the ceiling lights flash back on. "Ah, well, there you go. Too bad I missed the celebrations, but that's the end of Earth Day and my night shift. I hope you had a good Earth Day, and have a good night!"`
				decline

			label tourist
			`	You approach a woman with a bunch of oversized bags clustered around her seat. She's tapping rapidly on her datapad, but nonetheless she looks up when you approach. "Excuse me, Captain, I was just trying to figure out when the metro starts up again. Do you know?"`
			choice
				`	"I know just as much as you, sorry."`
				`	"Maybe it's to do with the blackout?"`
					goto "way in"
			`	"Ha, they shut everything down for Earth Day and then assume all us offworlders get the idea. What do you know..."`
			choice
				`	"Earth Day?"`
				`	"Shut everything down?"`
			`	"Didn't you see what was happening outside on your way in? It's something to do with Earth Day. Back in those old days before humans were able to get off this planet, they were stuck in a chain of issues and disputes over energy. You know, they didn't have fusion reactors back then. Awfully primitive times.`
				goto decided

			label "way in"
			`	"Yes, I suppose you must have seen what's happening outside on your way in. It's something to do with Earth Day. Back in those old days before humans were able to get off this planet, they were stuck in a chain of issues and disputes over energy. You know, they didn't have fusion reactors back then. Awfully primitive times.`

			label decided
			`	"So they decided that, on the 22nd of April each year, all of Earth would go into total blackout to symbolize that they didn't have enough energy to sustain themselves, and to remind them that the only way to advance was to keep pushing themselves forward, find new pathways to power, lest those blackouts became longer and more frequent. Fascinating, huh?"`
			choice
				`	"It seems a bit backwards."`
				`	"It is fascinating, thanks."`
					goto pass
			`	"Well, perhaps. But Earth is like that sometimes. It's survived through so much, and without Earth Day to remind our ancestors that we must keep looking forward, maybe you wouldn't be in your fancy little spaceship, would you?"`
			`	The lights in the spaceport turn back on as she says that, and she turns to look at her data pad again. "Oh, it's twelve o'clock. I've got to see if the metro's opened so I can get to my accommodation. Safe travels!"`
				decline

			label pass
			`	After the clock passes midnight, the lights in the spaceport come back on, followed by the signage and lights of the city surrounding it. A few workers come and snuff out the candles before putting them away in unseen closets.`
				decline

mission "Burthen Triathlon"
	minor
	source
		planet "Burthen"
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`Thanks to the planet's high gravity, Burthen is not a common destination, but today the spaceport seems to have a lot of visitors. Many of the usually empty landing pads are occupied, and you notice a sizable crowd at the edge of the spaceport as you step out onto its rather untarnished apron. Some members of the crowd are obviously from offworld judging by their height, and there's even a few media crews standing by, although it looks like their camera drones are struggling with Burthen's gravity.`
			choice
				`	(See what's going on.)`
				`	(Avoid the commotion and tend to your own business.)`
					decline
			`	Each step takes significantly more effort than you're used to, but you eventually reach the crowd. From the signs that have been put up on the way, it looks like the "Burthen Triathlon" is taking place today, and the spaceport has been designated the finishing point. A couple of especially sturdy-looking marquees have been set up; the smaller one appears to be the administration tent, currently only accessible to event staff, while the other one is far larger and is catering food and drinks for the crowd nearby.`
			choice
				`	(Walk over to the catering tent.)`
				`	(Stay outside.)`
					goto outside
				`	(Return to your ship.)`
					decline

			`	Thankfully, the walk to the catering tent is far shorter than the walk from your ship, but nevertheless you're exhausted by the time you drag your feet inside. A lot of effort has been put into this tent: the metal chairs are all sturdily-built to allow offworlders to pull themselves up, but cushioned as to not make it uncomfortable to sit in. A small firepit has been built in the middle of the tent, along with a couple fire extinguishers placed nearby, and the whole place is brightly lit in contrast to Burthen's typically chilly weather. Quite a few people, both Burthenians and offworlders, are mingling about here.`
			`	There's a counter in the corner with two levels, apparently so that the Burthenian attending it can serve both offworlders and locals. Alongside the typical drinks you've seen in spaceport bars and some local to the southern Core, the counter also offers a local drink called the "Antigrav" that claims to "ease visitors from Burthen's natural pull," and comes in a specially made glass, all for 30 credits.`
			branch "no credits"
				credits < 2
			choice
				`	(Order a regular drink from the counter.)`
				`	(Order the Antigrav from the counter.)`
					goto antigrav
					to display
						credits >= 30
				`	(Don't order anything and leave the tent.)`
					goto "leave tent"

			action
				payment -2
			`	You hand over a couple credits for the drink and leave the tent, sipping with some difficulty as you go. The Burthenian at the counter advises you not to drink too much of it at once, and not to drop the cup "unless you want a munted foot for a few weeks."`
				goto "leave tent"

			label antigrav
			action
				payment -30
				outfit "Antigrav Glass"
			`	It turns out the glass the Antigrav comes with has a miniature repulsor installed so that you don't need to hold it while drinking it. The drink itself is a highly carbonated soda that tastes like something in between lingonberry and raspberry, made from the native berries found in Westland, the district the spaceport is located in. The Burthenian at the counter advises you not to drink too much of it at once and to not turn it off while it's levitating, "lest it falls on your foot and we have to treat your bone fractures."`
				goto "leave tent"

			label "no credits"
			`	Unfortunately, it looks like all the drinks are too pricy for you.`
			choice
				`	(Leave the tent.)`

			label "leave tent"
			`	The crowd is a bit more active when you return outside, and over the heads of the locals you see on a large, portable screen that the leading triathlete is a particularly stocky Burthenian, wearing a white helmet and tight, dark sportswear.`
				goto "after tent"

			label outside
			`	Staying outside in the oppressive gravity and the chilly temperature, you move over to the sidelines and watch the large, portable screen that is broadcasting the leading competitors from above. It appears that competitors are divided into Burthenians and offworlders, with Burthenians wearing white helmets and offworlders wearing red helmets. It's nearing the end of the whole event; the competitor in front is named Abernathy, a stocky Burthenian apparently doing his eleventh Burthen Triathlon. Meanwhile, the leading offworlder is five hundred meters behind him, a competitor from Martini named Caldarone. Apparently, they've been at it for over 11 hours, beginning with a 1.5 kilometer swim, then a 40 kilometer bicycle ride, and finally a 10 kilometer run.`
			`	After a couple minutes, Abernathy emerges from behind a bend, camera drones chasing him. Cheers, whoops, and rather overly enthusiastic hollers erupt from the crowd, raising enormously as he dashes through the finishing straight, the drones now circling around him. Just over the crowd a loudspeaker announces, "And here comes the winner of the Syndicate Athletics Burthen Triathlon, the world triathlete champion, competitor number fifty-eight: Samuel Abernathy!"`
				goto end

			label "after tent"
			`	As he nears the finish line the Burthenians' enthusiastic cheers, whoops, and hollers erupt from the crowd, and the camera drones, their repulsors now calibrated for Burthen's gravity, circle around the finishing straight. Just over the crowd a loudspeaker announces, "And here comes the winner of the Syndicate Athletics Burthen Triathlon, the world triathlete champion, competitor number fifty-eight: Samuel Abernathy!"`

			label "end"
			`	Abernathy doesn't slow down until he's within an arm's length of the finishing line; as he crosses it he seizes the tape, making a yelp of simultaneous joy and relief. He holds the tape up before everybody in the crowd and at the cameras pointed at him, taking in the attention (and catching his breath) before accepting a bottle of water from someone on the sidelines.`
				decline

mission "CCOR Guerrilla Standoff"
	minor
	source "Gagarin"
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`Every map of human space places Gagarin in the list of seedy, go-at-your-own-risk pirate ports which would bring to mind the likes of Greenrock's fighting pits and Freedom's gear bazaars. Still, it appears much like any other old, slightly run-down Southern spaceport, only at a much grander scale. Being the center of the planet's extensive transportation system, it seems as if you are wading through thousands of Gagarians and offworlders in every atrium and hallway of this spaceport, as they do the same to make their connections on- and off-world.`
			`	But as you make your way into the central hall, you notice that, where you'd expect the greatest activity, everything has stopped. Even the ever-roving antigrav trolleys of cargo and supplies are backed up and motionless, and everybody's attention is directed at some sort of commotion in the very center of the spaceport.`
			choice
				`	(Take a look.)`
				`	(Go back to your ship.)`
					decline
			`	Stepping through the gaps within the established crowd you end up next to a spaceport gendarme. He appears as if he's meant to be on patrol duty but is too busy watching the distraction to do his job right now. Looking over the banisters beside him, you see first the enormous and oddly empty space in the middle of the hall, then a team of overalls-wearing men armed with drills and brushes. Surrounding them is a cordon of guerrillas in their rosy CCOR uniforms, sizing up the public and the spaceport security around them with their rifles and pistols.`
			`	The painting guerrillas are busily finishing off the touches of what appears to be a statue of the burgundy and white emblem of the Confederated Councils, while a pile of rubble beside it suggests that a symbol of the local government once stood in its place. As they step away from the statue, a lone man in a much better-kept uniform than the others steps forward in front of their work. You can feel the air chilling as he raises his head to speak.`
			choice
				`	(Listen in.)`
				`	(Step away before he makes his speech.)`
					decline
			`	You don't see any amplification equipment, yet his voice fills the room without effort.`
			`	"Gagarians and offworlders. Captains and travellers. Servicemen and farmers.`
			`	"The worlds of the Outer Rim, and indeed, those of the Republic and the entirety of humanity, have and continue to be despoiled and devastated by ruthless profiteering.`
			`	"The executives of the Syndicate and the landed gentry of the Paradise Worlds steal the efforts of tens of billions of men, women, and children, from Prime to Foundry; from Valhalla to Earth; from Bourne to Hestia, and beyond. And for near a century they have colluded to impose their designs on our worlds! The corporate insurrection in Novo Minho and the gang wars in the northern Outer Rim are an obvious extension of the arm of people like Alastair Korban, only leading to further suffering and bitter destruction in our region!`
			`	"But there is still hope. We can bring about the independence of Gagarin and unify this world that has been lost to the Syndicate-sponsored oligarchs and their cronies and puppet officials. We can reunite the Outer Rim and restore the prosperity stolen from us. We can form a new Confederated Councils and once again shine the light of Belenos across the entire galaxy!"`
			`	The gendarmes look around and consider the response of the crowd around them as the man finishes his speech to scattered applause. The speaker steps down and orders his guerrillas into formation before marching them out of the still crowd and into the back of a dusty, burgundy army van you hadn't noticed before, leaving the remains of the old statue scattered around the empty space.`
			`	You turn around and see the gendarme you ended up next to. He meets your eyes and recognizes your off-world air.`
			`	"Just an everyday interruption, Captain," he says. "Only nostalgists for the old cause. We get a dozen of these incidents a month." He seems to be interrupted by a buzz from the radio receiver at his hip and strides off into the crowd, leaving you on the ledge.`
			`	Slowly but surely, the spaceport snaps out of its shock and picks up its previous momentum, although as you turn around you pass two government-branded trucks mounted with cranes, almost certainly there to carry off the newly installed statue and to clean up the mess left behind by the guerrillas.`

mission "Raider returning to Mordente-Bridi"
	source "Mordente-Bridi"
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`Watching the microgravity section of the spaceport from one of the bars in Mordente Cylinder, you observe a Bastion in pirate markings coming nearly too fast for safe approach to the station, its hull covered in gashes and burns from what looks to be Plasma Cannon shots.`
			`	As it comes to a stop in a maintenance bay, the spaceport's engineering shuttles appear from all over and begin buzzing around the Bastion, assessing the damage and beginning the work on repairs. Meanwhile, its crew disperse from the ship and immediately begin unloading a multitude of busted-up crates and containers from the hold, probably raided from a civilian transport. It looks like their haul was worth the damage.`
			`	Within the hour the work shuttles scatter from the ship as they finish patching up its battered hull, and the Bastion maneuvers out of the bay almost as haphazardly as it did when it entered.`

mission "Militia returning to Solace"
	source "Solace"
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`Wandering around the main spaceport on Solace, you notice several rows of shiny new landing pads next to the Delta V company offices. A large banner announces that you are witnessing the grand opening of Delta V's new private spaceport, and a crowd of interested spectators has gathered near the perimeter of the fence.`
			`	Suddenly an Argosy comes streaking out of the sky, almost crashing into several smaller ships in the main spaceport before swerving out of sight behind a hangar in the direction of the new landing pads. There are shouts from the throng of onlookers, who all seem to think this was a stunt. Your more practiced eye, however, tells you that there are bullet marks on the Argosy's hull from a Gatling Gun. It was probably a miscalculation by the pilot's computer that almost caused the collision.`
			`	Soon afterwards, an announcement is made from a large speaker, telling bystanders that nothing bad happened and that they can go home now. After staying for a while out of curiosity, the crowd finally disperses. However, you stick around and notice the Argosy flying back into view to land in the main spaceport.`

mission "Republic 300 Year Anniversary"
	landing
	source
		government "Republic"
		not attributes "uninhabited"
	"offer precedence" 5
	to offer
		year == 3030
	on offer
		conversation
			`News headlines bombard your comms as you land on <origin>: today is the three hundredth anniversary of the Republic. A crowd has gathered in the local spaceport in something of a celebration as they tune in to the main news stations, websites, and blogs throughout human space that are commenting on this momentous day. However, you notice many passersby moving about with an air of disdain for the festivities, simply trying to get their business here over quickly, and being frustrated at the inevitable slowness of the local facilities today.`
			`	Originally formed by Earth and planets close to it, the Rim, and a few Dirt Belt worlds, the Republic went on to gradually expand and incorporate the Syndicate, Paradise Worlds, and the Deep. For three hundred years now, most of humanity has existed under its flag, and through protests and the space renaissance, waves of colonization, expansion, and battles against remnants of the Alphas, that flag remains flying over most human worlds today.`
			branch "war over"
				has "main plot completed"
			branch "war ongoing"
				has "chosen sides"
				not "main plot completed"
			`	Not all is well, of course, as the bombing of Geminus and Martini appears to have set the Republic on the precipice of war with the Free Worlds, in the southern portion of human space. You can't help but feel that much of the cheerfulness about this date has more to do with the national holiday than with a deep-rooted appreciation for the Republic's history and what it stands for.`
				goto end
			label "war ongoing"
			`	The ongoing war with the Free Worlds has greatly diminished what the Republic Department of Arts and Culture no doubt hoped to turn into the public event of the year. Local workers and merchant captains alike whisper among themselves, Navy personnel march to and from warships that come and go at an alarming rate, seemingly unfazed by the historical date, and some bar fights break out between likely inebriated local patriots and those reckless enough to voice their support for the Free Worlds here.`
				goto end
			label "war over"
			`	The recent Free Worlds war seemed to threaten this long history of stability, as battles raged over the skies of dozens of planets, and the threat of an open nuclear war loomed closer as the conflict escalated. The indiscriminate disappearance of many systems close to Earth, followed by the unified human front against the Pug invaders, seems to have knit together the sentiments of many throughout the Republic - for the time being, at least.`
			branch "zenith bombed"
				has "Wanderers: Sestor: Return to Wanderers: done"
			branch "sestor beaten at farpoint"
				has "Wanderers: Sestor Alt: Return to Wanderers: done"
			label end
			choice
				`	(Celebrate the Republic's 300th anniversary.)`
					goto celebrate
				`	(Go on about your day as usual.)`
			`	You switch your media channels off from the celebrations, and get to your ship's system checks. Once you're done, you prepare for just another day.`
				decline
			label celebrate
			`	You take an hour or two to join in on the festivities, because after all, it's not everyone who can claim to have witnessed a centenary anniversary of a nation. Stepping off the <ship>, you head to the spaceport, have a couple of drinks, speak to some of the locals, and party with a few revelers. Once it's getting late, you head back to your ship and reflect on the meaning of this day throughout human space.`
				decline
			label "zenith bombed"
			`	Dimming the mood of the otherwise mostly positive news titles are the comments about a mysterious armada of robotic warships invading the Far North. Having crushed the Navy forces over Farpoint, the fleet was only partially beaten after the detonation of a terrible bomb on Zenith, which wrecked much of the planet. Indeed, it was weeks still before the scattered ships were fully destroyed, and confidence in the Navy's - and, by extension, the Republic's - ability to keep humanity safe seems to have been affected significantly...`
				goto end
			label "sestor beaten at farpoint"
			`	Web comments and news anchors seem to be particularly excited to comment on the recent victory of the Navy over the mysterious armada of robotic warships that invaded the Far North. Though at a great cost to the northern fleet garrisons, the invading fleets were successfully stopped at the Farpoint base, preventing the ships from causing any further harm. Veterans of the Farpoint battle seem to be hoarding the spotlight, giving emotional reports of their memory of the fight, and of the sacrifices they went through to achieve victory.`
				goto end

mission "Exotic Life: Delve"
	minor
	source Delve
	"offer precedence" 5
	to offer
		random < 20
	on offer
		conversation
			`The air in Delve's spaceport is crisp, carrying the mineral tang of weathered stone alongside occasional whiffs of fuel and lingering industrial cleaners. As you walk toward your ship, you notice teams of workers dressed in biohazard gear moving between the departing vessels in pairs, bulky sprayers strapped to their backs, nozzles hissing as they coat hulls in a fine mist. Each ship gets a thorough pass before takeoff, the workers checking crevices and landing gear with practiced efficiency.`
			choice
				`	(Ask them what they're doing.)`
				`	(Ignore them and continue on your way.)`
					decline
				`	"Shipworm outbreak?"`
					to display
						has "exotic animals: delvan shipworm known"
					goto known
			`	You approach a pair of workers as they finish spraying down a Bulk Freighter and ask what they're doing. One of them, a grizzled veteran with deep lines around his eyes, barely glances at you. "Shipworms," he mutters, already moving to the next ship.`
			`	The other, a younger worker practically bouncing in his boots, grins behind his respirator. "Yeah! Little metal-chewing pests. They're native to Delve, infest the mines, the shipyards - anywhere there's metal to sink their teeth into. If we didn't spray every ship before takeoff, they'd be all over the galaxy by now." The veteran sighs. "They already are all over the galaxy. Because people aren't careful enough."`
			`	The rookie ignores him. "They start as tiny worms, barely bigger than your pinky, but once they find metal, they melt into it, make a cocoon that looks just like part of the ship! Bombacle, we call 'em. Then BAM! A few months later, the casing bursts open like a bomb! Bombacle!"`
			`	The veteran shakes his head. "What he means is, they're an invasive hazard if they get off-world. That's why we spray. No shipworms, no problems."`
			`	The rookie gives his sprayer an enthusiastic shake. "And I get to torch every last one I find. You ever see one pop under a high-heat blast? Satisfying as hell." The veteran just mutters, "You'd think the novelty would wear off."`
			action
				set "exotic animals: delvan shipworm known"
			`	With another look at the freshly sprayed Bulk Freighter, you make a mental note to give your own ship a once-over before takeoff.`
				goto ending
			label known
			`	One of them, a seasoned veteran with weary eyes, lets out a long-suffering sigh. "Great. At least this one actually knows what they are." In contrast, the other - a fresh-faced worker brimming with energy - practically lights up. "They're like space barnacles - until they hatch into wormy bombs! I was just telling him how fun it is to fry 'em!"`
			`	The veteran gestures around at the cavernous spaceport. "We don't get outbreaks here. This is Delve. They're Delvan shipworms. They're native. Always have been. They infest the mines, the shipyards, anywhere with exposed metal. That's why every ship gets fumigated before takeoff - to keep 'em from spreading even more than they already have."`
			`	The rookie eagerly jumps back in. "You ever see one break out of a cocoon in real time? Casing splits and it blasts out like a grenade - it's wild!" The veteran just rubs his face.`
			`	With nothing more to add, you make a mental note to give your ship a once-over before takeoff as the workers continue their routine.`
			label ending
			`	You give the fumigation teams a final glance and make your way back to your ship. The metallic surfaces around you now hint at unseen creatures lurking.`
				decline

mission "Exotic Life: Ada"
	minor
	source Ada
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`You make your way through a dimly lit section of the spaceport to a near-empty hangar, where the usual hum of activity is dampened by an eerie stillness. The back of the hangar has a reinforced glass cargo door cracked open, perhaps by mistake. You peer inside to see large, sealed tarps stretched across the area, some draped over cargo crates, others covering entire sections. One enormous tarp appears big enough to be covering a whole ship. Each one bears the same stark warning in bold lettering: "DELVAN SHIPWORM FUMIGATION." The air has a faint chemical tang to it, and ahead, two figures move methodically between the tarps towards the door.`
			`	They are covered head to toe in protective suits, thick gloves, and respirators obscuring their faces. One carries a handheld sprayer, releasing a fine mist into the air, while the other checks a monitor strapped to their arm. Their boots crunch softly against the floor as they pass.`
			choice
				`	(Ask them what's going on.)`
				`	(Ignore them and continue on your way.)`
					decline
				`	"Nasty little bombacles, aren't they?"`
					to display
						has "exotic animals: delvan shipworm known"
					goto known
			`	Curiosity gets the better of you, and you ask what this is all about, gesturing at the tarps. One of them pauses, their voice muffled by the respirator. "Delvan shipworm outbreak. Nasty infestation. We're exterminating them before they spread to other ships or the city." You can see small scorch marks on the floor nearby - signs of something being burned away.`
			choice
				`	"What's a Delvan shipworm?"`
				`	"Nasty bombacles, aren't they?"`
					to display
						has "exotic animals: delvan shipworm known"
					goto known
				`	"Well, good luck with that. I should get going."`
					decline
			`	The worker with the monitor barely hesitates before responding. "Delvan shipworms are an invasive species from Delve. They start as larvae, tiny worms-"`
			`	"Bombacles!" the one with the sprayer interjects, voice distorted through the respirator. "They latch on ships, grow into barnacles, then they're bombs!"`
			`	The first worker exhales, shaking their head. "They're more than that. The larvae attach to metal - usually ship hulls, but it can be mining equipment, or anything, really - and secrete an enzyme that corrodes the surface, breaking it down so they can form a cocoon around themselves. This builds up a high-pressure gas, so the outer shell hardens to compensate, blending in with the surrounding metal."`
			`	"Yeah, until - BOOM! Three months later, it blasts open like a grenade and out come a dozen disgusting worms!"`
			`	"You make it sound like a horror movie."`
			`	"It is a horror movie if you're next to one when it hatches." The sprayer-wielding worker turns back to you. "Writhing wrigglers that leave a hole the size of your palm in whatever they break out of. Plenty of ships have lost pressure 'cause of them."`
			`	The first worker sighs. "That's why we're dealing with it now. We don't let them spread, we don't get people vented into space."`
			action
				set "exotic animals: delvan shipworm known"
			`	Your gaze drifts back to the tarps, imagining what might be skittering beneath them. You nod in thanks and step away, making a mental note to double-check your ship's hull before takeoff.`
				goto ending
			label known
			`	The worker with the sprayer perks up. "Finally, someone who gets it!" they say, shaking their sprayer for emphasis.`
			`	The other groans. "They are not barnacles and they are not bombs. They are a highly adaptive invasive species with a complex-"`
			`	"Yeah, yeah, they're still bombacles," the sprayer worker cuts in. "Point is, we kill 'em before they kill ships. And cities. And people."`
			`	The monitor worker exhales but gives you a nod. "At least you understand how important this is. Most folks just walk by without a second thought." The sprayer worker waves you along. "Anyway, let us work before one of these things chews through something vital."`
			`	Satisfied, you leave them to their job, making a mental note to check your own hull before takeoff.`
			label ending
			`	With one last glance at the fumigation tarps, you head back to your ship, suddenly aware of how fragile a metal hull can be in the wrong circumstances.`

mission "Exotic Life: Glaze"
	repeat
	minor
	source Glaze
	"offer precedence" 5
	to offer
		random < 10
		or
			not "chosen sides"
			has "main plot completed"
		not "exotic life: seen glaze apes"
	on offer
		conversation
			`You step to the edge of the mesa from the spaceport, the wind blowing as you take in the view. The canyons stretch out before you, a maze of red and gold stone, their depths lost in shadow. Far in the distance, something moves - small figures, barely more than specks, making their way through one of the ravines. You squint, but the details remain elusive.`
			`	Nearby, a weathered set of credit-operated binoculars stands bolted to the ground, a faded sign above them reading: 1 credit per use.`
			choice
				`	(Take a closer look for 1 credit.)`
					to display
						credits >= 1
				`	(Ignore the specks and return to my ship.)`
					to display
						credits >= 1
					decline
				`	(Pat my empty pockets and return to my ship as I can't even afford the 1 credit fee.)`
					to display
						credits < 1
					decline
			action
				payment -1
			branch "no rare apes"
				random < 20
			`	The binoculars hum as you focus in on the figures, expecting hikers, but what you see is something else entirely. A small group of shaggy, long-limbed creatures move carefully through the canyon. Their fur is the same hue as the sandstone, blending almost perfectly with the terrain. They walk on two legs, but with a hunched, cautious gait, pausing often to glance around before continuing.`
			`	One of them stops near a boulder, kneeling to scoop up a handful of dust and let it run through its fingers, as if testing the wind. Another lingers behind the rest, turning its head slightly, perhaps listening for something. There are no signs of tools or fire - certainly nothing to suggest the "canyon people" of local legend - but there's an undeniable sense of awareness in the way they move and seem to belong to the landscape itself.`
			action
				set "exotic life: seen glaze apes"
			`	After a long moment, they disappear behind a ridge, their camouflage making it hard to tell if they were ever there at all. You step back from the binoculars, the last glimpse of them lingering in your mind.`
				decline
			label "no rare apes"
			`	Curiosity gets the better of you, and you pay a credit to the machine. The binoculars whir softly as they adjust, bringing the distant canyon into focus. A group of brightly dressed tourists walk along a winding trail, pointing at rock formations and stopping to take photos. One of them waves excitedly at something - maybe an unseen guide explaining the landscape.`
			`	Just another tour group exploring the canyons. You step back from the binoculars with a small chuckle.`
				decline

mission "Exotic Life: Bluestone"
	minor
	source Bluestone
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`You step off your ship and wander around Bluestone's quiet yet functional spaceport. The buildings, made mostly of durable plastic resin, form a quaint but near-uniform red-brown landscape, in sharp contrast to the small yellow pub in the center. The spaceport is quiet, but the low hum of activity from a nearby oil drill gives it some life. As you are entering the pub, you spot an announcement on a bulletin board:`
			`	"Guided Tour: Hybrid Crop Research Village - an exceptional hub of field-based research led by the Cornucopia College of Agriculture, nestled within captivating landscapes!"`
			`	The bulletin catches your eye. It's a rare chance to see something other than refinery equipment and plastics, and the mention of hybrid crops entails something different. There's a signup sheet, and only a few spots remain.`
			choice
				`	(Sign up.)`
				`	(Skip the tour.)`
					decline
			`	After signing up for the next tour, you are directed to hop onto a beat-up old bus that rattles along to the research village. You notice Bluestone's rusty industrial sprawl transition into the rocky fields of deep, desaturated blue grasses that the planet is known for. The village itself appears a small yet dynamic community, centered around a sleek, glass-paneled laboratory and greenhouse emanating reddish-yellow light. Dotted around are modest plastic resin apartment buildings. The entire community is surrounded by an expansive field containing rows and rows of crops.`
			`	You get off the bus and are immediately ushered into the laboratory by a young-looking tour guide, along with half a dozen other tourists. She has a small nametag that reads:`
			`		Zea S.`
			`		Community Tour Guide`
			`		MS in Agronomy`
			`		Cornucopia College of Agriculture`
			`	"Welcome to our guided tour of Bluestone's Hybrid Crop Research Village! Here, our dedicated scientists harness the secrets of native flora. The grasses and lichens you see around you have evolved unique photosynthetic pigments to thrive in our planet's dim, reddish light. Before we continue, can anyone name the most famous photosynthetic pigment found on Earth?"`
			choice
				`	"Tea leaves."`
					goto "once wrong"
				`	"Green."`
					goto "once wrong"
				`	"Chlorophyll."`
					goto "once right"
				`	"Purple paint."`
				`	(Remain silent.)`
					goto awkward
			`	"That's what I use to paint my dragon minis!" a tourist blurts out, his excitement briefly overtaking him before he immediately clears his throat to regain his composure.`
			label "once wrong"
			`	Zea shifts uneasily. "Umm, not exactly. The answer I was looking for was chlorophyll.`
				goto chlorophyll
			label "once right"
			`	Zea beams broadly. "Exactly right! Chlorophyll is fundamental to life on Earth.`
				goto chlorophyll
			label awkward
			`	There is an awkward pause as Zea scans the group. After another moment the tour guide sighs lightly, "Well, it's chlorophyll." Visibly trying to downplay the moment, she adds, "No worries - let's move on.`
			label chlorophyll
			`	"These pigments on our native plants are distinct from Earth's chlorophyll. Green chlorophyll actually captures red light fairly well, but not as well as a cyan pigment. Our planet's reddish hue can also be deceiving - near-infrared light, an invisible light just beyond what humans can see, is what our native plants truly thrive on. The vegetation can capture those wavelengths of light with remarkable efficiency. By deciphering their genetic blueprints, we've identified key adaptations that can be hybridized into crops found on Earth or other worlds to enhance their resilience in the low-light environments of cooler stars."`
			`	You are then led outside to a small garden of native grasses and lichens next to the laboratory. "And now, take a closer look at our fascinating native species. Notice their muted blue and near-black colors - this isn't just a quirk of nature, but a vital adaptation that enhances absorption of red and near-infrared light on our dim planet. Their extensive root systems delve deep into the sparse soil, allowing them to efficiently access as much nutrients and water as possible under low-light conditions. Now, the leaves on these grasses are much larger and flatter than what you'd see on similar grasses on planets with brighter sunlight. Can anyone tell me why our plants might have larger and flatter leaves than somewhere like Earth?"`
			choice
				`	"Larger leaves maximize surface area to capture more light."`
					goto "twice right"
				`	"They look nicer in the breeze."`
					goto "twice wrong"
				`	"It helps herbivores leaf them alone."`
				`	(Say nothing.)`
					goto "twice shy"
			`	A collective groan ripples through the tour group, punctuated by a couple of reluctant chuckles. Zea remains completely oblivious as she continues with the tour.`
			label "twice wrong"
			`	"Ummm, actually, that's not quite right. The main focus of these larger leaves is to maximize surface area for better light absorption."`
				goto "native plants"
			label "twice right"
			`	"Exactly right! They maximize surface area for better light absorption, which is crucial on our dim planet. Great answer!"`
				goto "native plants"
			label "twice shy"
			`	The guide makes eye contact with most of the group for an uncomfortable beat as she awaits a response. When none come, the tour guide says, "Well, it's because larger, thinner leaves maximize the surface area for light absorption... ummm, let's look at some grasses now."`
			label "native plants"
			`	She walks up to one of the grasses and gesture at its leaves. "The large, thin leaves of our native plants are designed to maximize surface area to better collect infrared rays, ensuring they capture every photon they can. These features collectively enable our plants to thrive where Earth plants would struggle."`
			`	The tour continues as you enter a state-of-the-art greenhouse. Inside, hybrid crops flourish under controlled lighting that varies from yellow to red, as you feel warm from the heat lamps above. Zea points at a deep pot filled with a muted blue-black wheatgrass that has huge, delicate leaves. "Here, traditional Earth crops like wheat have been endowed with traits inspired by our native species. Observe the broader, darker leaves that boost photosynthetic efficiency in low-light conditions. These modifications not only help the plants harness energy from our reddish sunlight, but can be used across the galaxy to grow food where it was impossible before!"`
			`	You feel the tour drawing to a close as the tour guide gathers the group for a final discussion.`
			`	"Thank you for joining us on this exploration of the cutting edge of hybrid crops. I hope you leave here today with a renewed appreciation and curiosity for the foods you eat and the remarkable plants that surround us."`
			choice
				`	(Clap.)`
				`	(Do nothing.)`
					goto silence
			`	You begin clapping and the room fills with applause as the other tourists join in. Zea smiles warmly, "Thank you all again, and have a wonderful day!"`
				goto ending
			label silence
			`	The silence lingers a little too long. Zea waits another moment, then nods to herself a few times before quietly walking off.`
			label ending
			`	With the tour's ending, you board the same beat-up old bus that brought you here. As the bus lurches back towards the copper-colored resin of the spaceport, you have time to take in the rolling fields of blue-black grasses swaying under the dim, reddish suns of Bluestone.`
				decline

mission "Exotic Life: Geyser"
	minor
	source Geyser
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`As you wander through a row of half-demolished hangars, you spot clusters of spiny cacti with flat, rounded pads and bright red fruit growing in the rubble. A local, noticing your curiosity, strides over with a wry grin.`
			`	"That plant over there? That's a prickly pear cactus. They're from right here on Geyser. Hardy things, too - they're so aggressive they've even taken root all over Earth."`
			choice
				`	"That doesn't sound right. They're native to Earth, not Geyser."`
					goto argue
				`	"Huh. Okay then."`
			`	The local nods, satisfied. "Glad you can appreciate the local plants. Have a good one." They head off towards the food court.`
				decline
			label argue
			`	"You tourists think you know everything. What are you, a plant scientist?"`
			choice
				`	"A botanist?"`
				`	"Oh no, I'm no scientist."`
			`	"Bah!" With a dismissive wave, they storm off, cursing tourists under their breath.`
				decline

mission "Exotic Life: Bloodsea"
	minor
	source Bloodsea
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			branch "former pirates"
				or
					has "event: bloodsea independent"
					has "event: bloodsea joins free worlds"
			`You step into one of the raucous open-air marketplaces of Bloodsea, where armed vendors and hulking guards barter over stolen cargo amid piles of weathered crates. As you weave through the maze of noise and color, you catch sight of a man huddled behind one of the crates - he's coughing violently, blood staining his lips, the crate, and the ground beside him. Before you can react, a lean, scarred woman fixes her steely gaze on you, her face hidden beneath a pair of stained bandanas - one concealing her mouth and nose, the other wrapped around her head.`
				goto "rest of hello"
			label "former pirates"
			`You step into one of the raucous open-air marketplaces of Bloodsea, where wary-looking vendors and armed guards barter over allegedly legal cargo amid piles of weathered crates. As you weave through the maze of noise and color, you catch sight of a man huddled behind one of the crates - he's coughing violently, blood staining his lips, the crate, and the ground beside him. Before you can react, a lean, scarred woman fixes her steely gaze on you, her face hidden beneath a pair of stained bandanas - one concealing her mouth and nose, the other wrapped around her head.`
			label "rest of hello"
			`	"That man's got the Bloodsea Bloom," she says flatly, as if mentioning the weather.`
			choice
				`	"What's that?"`
				`	(Get back to your ship.)`
					goto declined
			`	She scoffs and leans in, her voice dropping to a rough whisper. "The red tide. Every summer, the bloody sea blooms, fills the air with nasty, toxic bits that chew up your lungs if you catch a whiff. No local goes near the beach when the bloom's ablooming."`
			`	Then, she suddenly screams, "Only offworlders and blind fools with a death wish swim in that poison!"`
			`	A wry grin floods her face, and she adds in a conversational tone, almost as an afterthought, "Now, I'll flay you alive and turn you into chum if you don't buy some fish bait. Eight racks." She slams a scarred hand into a rancid barrel beside her.`
			choice
				`	(Give her 80,000 credits for the barrel of rotten fish bait.)`
					to display
						credits > 80000
				`	(Give her 8,000 credits for the barrel of rotten fish bait.)`
					to display
						credits > 8000
					goto thousand
				`	(Give her 800 credits for the barrel of rotten fish bait.)`
					to display
						credits > 800
					goto hundred
				`	(Run for it.)`
					goto declined
			action
				payment -80000
				"reputation: Pirate" += 1
			`	You grit your teeth against the stench and fight back the urge to gag as you fumble over the credits to the gnarled woman. She suppresses an amused glint in her eye and, with surprising care, gently pushes the putrid barrel towards you, her calloused fingers brushing the rim in a brief, elegant flourish. You bow your head in gratitude, roll it away, and once she's out of sight, ditch the barrel and dart back to the <ship>, leaving behind a grim and grimy reminder of this unruly port.`
				decline
			label thousand
			action
				payment -8000
			`	You grit your teeth against the stench and fight back the urge to gag as you fumble over the credits to the gnarled woman. With an irritated snort, she shoves the putrid barrel towards you, and you quickly roll it away. Once she's out of sight, you ditch the barrel and dart back to the <ship>, leaving behind a grim and grimy reminder of this unruly port.`
				decline
			label hundred
			action
				payment -800
			`	You grit your teeth against the stench and fight back the urge to gag as you fumble over the credits to the gnarled woman. Her nostrils flare, and she snatches to credits with a snarl. "Not even one rack," she spits, eyes blazing. Without warning, she hauls the barrel off the ground to slam it directly against your shin. You yelp and stagger backwards. She rakes a jagged knife through the air, roaring, "I'll carve you like a cod and string your entrails for the gulls!" You flee her and the barrel to dart back to the <ship>, her furious curses echoing behind you.`
				decline
			label declined
			`	You race through the maze of weathered crates and guarded stalls. As you push past the chaotic crowd toward the safety of your <model>, the woman's bellowing laughter - a harsh, unbridled roar of contempt - echoes in your ears.`
				decline

mission "Exotic Life: Albatross"
	minor
	source Albatross
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`You trudge through the biting wind to a weathered spaceport bar, its exterior marked by signs proclaiming "No Gods, No Masters," and "No Cybernetic Implants. No Badgers, Weasels, Or Polecats." Inside, the air is heavy with shadow and smoke - worn wood panels, dim, flickering lights, and cluttered signs declaring even more peculiar prohibitions. Slouched in a corner by the heavy door, an old man sits silently, his half-lidded eyes watching the drunken banter and clinking glasses. You could approach him, and perhaps press for answers about the bar's odd proclamations.`
			label "next question"
			choice
				`	"Why no 'Cybernetic Implants'?"`
					goto implants
					to display
						not "heard implants"
				`	"What's the deal with 'Badgers'?"`
					goto badgers
					to display
						not "heard badgers"
				`	"Turnips?"`
					to display
						has "heard badgers"
						not "heard turnips"
					goto turnips
				`	"The sign says 'No ${plural nouns}'?"`
					goto "mad lib"
					to display
						or
							has "heard implants"
							has "heard turnips"
							has "heard weasels"
						not "heard madlib"
				`	"What's wrong with 'Weasels'?"`
					goto weasels
					to display
						not "heard weasels"
				`	"What about 'Polecats'?"`
					goto polecats
					to display
						has "heard weasels"
						not "heard polecats"
				`	"Albatross?"`
					goto albatross
					to display
						has "heard polecats"
				`	(Thank him for the answers and leave.)`
					goto ending
					to display
						or
							has "heard implants"
							has "heard badgers"
							has "heard weasels"
				`	(Turn around and leave.)`
					goto ending
					to display
						not "heard implants"
						not "heard badgers"
						not "heard weasels"
			label implants
			action
				set "heard implants"
			`	The old man grunts, leaning forward so that his voice drops to a rough whisper. "Cybernetic implants ain't allowed 'round here - always cheat at cards. Can't trust a rigged hand when fate's supposed to be fair!"`
				goto "next question"
			label badgers
			action
				set "heard badgers"
			`	He pauses, then mutters simply, "Turnips."`
				goto "next question"
			label turnips
			action
				set "heard turnips"
			`	He explodes. "Badgers! They'll dig up every last turnip I grow, ruining my patch faster than a cyborg cleans house. Nothing but trouble!"`
				goto "next question"
			label "mad lib"
			action
				set "heard madlib"
			`	His lips curl into a bitter snarl as he spills a flood of exasperation, "They cause ${pirate adjectives that work as titles}, ${pirate adjectives that work as titles}, ${pirate adjectives that work as titles} ${bad outcomes}!"`
			`	It's unclear how he expects you to respond.`
				goto "next question"
			label weasels
			action
				set "heard weasels"
			`	He snorts dismissively. "Weasels, now, they're just tiny polecats scampering about like mischief incarnate - ain't worth their salt, and worse, troublemakers by nature!"`
				goto "next question"
			label polecats
			action
				set "heard polecats"
			`	His face darkens, and his voice grows weighty and ominous. "Polecats, they attract... the Albatross." For a suspended moment, the chatter ceases; the clamor of glasses and low murmurs fall silent as every patron registers the weight of that word. Then, as if on cue, the noise resumes, and the hubbub goes on as usual.`
				goto "next question"
			label albatross
			`	That single word slices through the renewed din, and in a heartbeat, the atmosphere shatters. Several patrons rise from their stools, their expressions hardening into threatening scowls. The old man, eyes distant and vacant, seems lost in thought while it becomes clear that you have crossed a forbidden line.`
			`	Rough hands grip your shoulders, and before you can protest, you're dragged toward the door. Outside, in the biting wind, the echo of their shouted threats follows you. Perhaps some stones are best left unturned.`
			label ending
			action
				clear "heard implants"
				clear "heard badgers"
				clear "heard turnips"
				clear "heard madlib"
				clear "heard weasels"
				clear "heard polecats"

mission "Little Vienna in New Austria"
	minor
	source "New Austria"
	"offer precedence" 5
	to offer
		random < 10
	on offer
		conversation
			`As you walk from the spaceport's landing pads towards the center of the village, your attention is caught by a worn-down sign pointing you to the "Kleinwean Bezirk."`
			choice
				`	(Follow the sign.)`
				`	(Ignore the sign and keep walking.)`
					decline
			`	Curious, you decide to investigate, turning into a narrow street that feels like an echo of Old Vienna. A handful of historic-looking buildings line the cobblestone path, their facades adorned with dramatic stonework and flowery tilework. A small concert hall, labeled "Bach Collegium Konzertsaal", hums with the faint sound of string instruments tuning. Nearby, the aroma of rich, chocolatey coffee drifts from a small coffeehouse.`
			`	Outside the coffeehouse, a man at a marble table sips his coffee while reading a local newspaper. You can see the front page with the headline: "Mitreibender Mozart mit dem Bach Collegium Konzertsaal", featuring a photograph of a smiling conductor at the center of a small orchestra. On the reader's plate rests a bright pink sponge cake, its color fitting right in with the rich tones of the street.`
			`	As you linger, a well-dressed older woman approaches. Her voice, imbued with a musical rhythm, greets you with a hearty "Gruess Gott!`
			`	"Not many offworld visit Kleinwean, which is a shame, as you can see it's quite the New Austrian 'gem'," she remarks with a wink. "I was on my way to the concert - my husband is sick - and I would hate for his ticket to go to waste. Would you do me the honor of taking it?"`
			choice
				`	(Accept the ticket.)`
				`	(Politely decline.)`
					goto declined
			`	You graciously accept the invitation and follow her to the intimate concert hall. Despite its modest size, the hall houses a full orchestra. Once you're comfortably seated, the conductor steps forward, clears his throat, and in a measured tone declares:`
			`	"Willkommen im ehrwuerdigen Bach Collegium Konzertsaal! Wir sind Lichtjahre von Mozarts Heimat entfernt, aber auch im Zentrum von Kleinwean! Geniessen Sie das Konzert!"`
			`	The words hang in the air as you notice the conductor's smile, strikingly familiar from the newspaper photograph. With his invitation to lose yourself in the performance still echoing, the orchestra begins a stirring rendition of Mozart. The notes dance through the air with crystalline clarity, and you even recognize one or two of the melodies, each serving as a bridge to the Old Vienna of Earth.`
			`	Even after the performance, you feel the sound of music resonate in your bones as you glance back one more time at New Austria's hidden cultural enclave.`
				goto backtoship
			label declined
			`	You thank her kindly but explain that you're not in the mood for a concert. She nods understandingly, her eyes softening with disappointed yet gracious acceptance. You finish your exploration of the "Kleinwean Bezirk", absorbing the ambiance of the cobblestone street as the scents of coffee mingle with the sound of music.`
			label backtoship
			`	With the atmosphere steeped in nostalgia for a distant city on a distant world long past, you return to your ship.`

phrase "racetrack"
	word
		"Racetrack"
		"Speedway"
		"Arena"
		"Course"
		"Circuit"
		"Glideway"
		"Hover Circuit"
		"Velocity Course"
		"Hoverloop"

phrase "sunracer opening"
	word
		"As you walk through the din of Sunracer's bustling spaceport"
		"As you wade through the clang and clatter of Sunracer's ever-churning shipyards"
		"Amidst the city's persisting glitz"
		"Lost in a maze of hangars and half-built hulls"
		"While navigating through the organized chaos of Megaparsec shipyards"

phrase "sunracer hovercraft adhook"
	word
		"dazzling holographic display"
		"radiant, floating billboard"
		"vivid holographic advertisement"
	word
		" seizes your attention"
		" catches your eye"
		" appears overhead"

phrase "sunracer hovercraft adcloser"
	word
		"The ad flashes sleek"
		"Photo-realistic images show agile"
		"The visuals display streamlined"
	word
		" hovercraft "
		" vehicles "
	word
		"slicing a twisting course through untamed terrain. "
		"racing along a rugged, serpentine track. "
		"dashing along wild, winding roads. "
	word
		"The ad copy% "
		"The display's text% "
		"The words below "
	word
		"promise high-speed thrills for the audience."
		"provide a teaser of the breakneck action to come."
		"offer heart-pounding, high-octane excitement."
		"beckon wealthy corporate sponsors to back the adrenaline-fueled event."
		"offer the perk of free parking."
		`simply state "Sponsored by Megaparsec."`
	replace
		"% promise" " promises"
		"% provide" " provides"
		"% offer" " offers"
		"% beckon" " beckons"
		"% simply state" " simply states"
		"%" ""
		
phrase "sunracer city to wilderness description"
	word
		"the bustle of Sunracer's shipyards"
		"the vibrant Megaparsec metropolis"
		"the clamor of Sunracer's industrial hub"
	word
		" fades into "
		" gives way to "
		" transitions to "
	word
		"shimmering lakes dotted with sailboats and fishing vessels"
		"picturesque rolling hills of sprawling farmlands"
		"a serene stretch of raw, unspoiled nature"

phrase "sunracer fan tshirt"
	word
		"clad in Megaparsec Racing Technologies gear, with a large Quicksilver emblazoned across the front of the shirt"
		"wearing Megaparsec Racing Technologies apparel - the shirt covered with hundreds of tiny Splinter, Manta, and Quicksilver silhouettes"
		`dressed in a Megaparsec Racing Technologies sweater that has the words "Mighty fast, impossibly light - Megaparsec" at its center`
		`dressed in a Syndicate Performance Racing shirt with the centered words "Smart racers know race pace is key. Smart racers race for Syndicate Performance Racing"`
		`wearing a Deep Sky Dynamics hat with the words "Peace, Prosperity, Progress... Podium"`
		`dressed in a Delta V Grand Prix sweater on which the words "The Wild Pace of Plasma" are surrounded by various images of tiny chipmunks, greyhounds, capybaras, and impalas running across the shirt, leaving tiny footprints`
	word
		". Though obviously not a racer, "
	word
		"he clearly is very familiar with hovercraft racing. You ask him for an overview and he responds"
		"she clearly is very familiar with hovercraft racing. You ask her for an overview and she responds"
		"they clearly are very familiar with hovercraft racing. You ask them for an overview and they respond"
		

phrase "sunracer hovercraft race description"
	word
		"You push through the buzzing entrance, "
		"The entrance bursts with energy as you weave through enthusiastic crowds, "
		"Amid a cascade of bright lights and raucous cheers, you enter the racetrack, "
		"The crowd briefly disperses, leaving you ample space to go through the entrance, "
	word
		"navigate a series of well-lit steps, and settle into your seat. Now you are ready for the race."
		"each step drawing you closer to the exciting race view from the stands."
		"then follow well-marked signs that lead you into the heart of the action in the stands."
		"where banners and cheers guide you to the stands for you to sit during the race."
	word
		" "
	word
		"It is a clear, brisk sky overhead, "
		"The day's air is crisp and electric with anticipation, "
		"A partly cloudy day blankets most of the track, "
		"Scattered showers mist the air, "
	word
		"while a gentle wind stirs the dust on the track."
		"with the sun's beams lending a warm glow to the cool sky."
		"with sunlight and swirling mist setting an unpredictable stage."
		"while a shifting haze fails to hide the crowd's raw anticipation."
	word
		" "
	word
		"A pulsing neon light flashes "
		"The starting gun goes off "
		`A booming voice announces, "It's repulsors on and away we go!" `
		"In an instant, there's a thunderous explosion "
	word
		"at the starting line"
		"in front of the starting grid"
	word
		" and the hovercraft launch forward in a burst of speed."
		", then engines ignite in a frenzy to send the sleek machines darting into the first lap."
		" as the racers enter into a chaotic scramble for the lead."
		" - hovercraft fighting for position as one leaps ahead of the rest."
	word
		" "
	word
		"An hour in, the racers continue to weave through the course's twisting tracks, "
		"Midway, the competition transforms into a dynamic dance, "
		"As the race unfolds, a few hovercraft nearly crash before recovering, "
	word
		"each maneuver a blend of precision and raw power."
		"with daring overtakes and strategic maneuvers."
		"each moment getting closer to the crescendo of the race's final hour."
		"as competitors push their vehicles to the limit at every turn."

phrase "sunracer hovercraft victory description"
	word
		" is today's victor."
		" seizes the day with a victory."
		" wins this race."

phrase "sunracer hovercraft victory exit"
	word
		"With the race finished, the crowd gradually disperses, and you wander back to your <model> amid the soft buzz of post-race chatter."
		"As the stands empty, you slip away through clusters of lingering fans back to the <ship>."
		"Despite the race being over, the crowd still roars with adrenaline, and you still feel the crowd's excitement as you return to your ship."
		"The venue quiets as spectators scatter, leaving you to drift back to your <model> in the calm that's followed the thrill of the race."

mission "A Sunracer Hovercraft Racing"
	minor
	repeat
	invisible
	"offer precedence" 10
	to offer
		random < 40
	source "Sunracer"
	substitutions
		"<racename>" "${adjectives} ${racetrack}"
		"<megaparsec name>" "${civilian}"
		"<syndicate name>" "${syndicate fighter}"
		"<delta name>" "${free worlds fighter}"
		"<deep name>" "${deep fighter}"
	on offer
		conversation
			`${sunracer opening}, a ${sunracer hovercraft adhook}: there's a hovercraft race at the <racename>, just a few hours away by hover rail, or much faster aboard a <model>. ${sunracer hovercraft adcloser}`
			choice
				`	(Check it out.)`
				`	(Skip the race.)`
					decline
			action
				"race length" = 3 + "roll: 2"
				"syndicate boost" = 2 + "roll: 2"
				"delta boost" = 4 + "roll: 8"
				"deep boost" = 6 + "roll: 12"
				# The ( ( 10 - x + "race length" ) / 10 ) flips to 1 when race length is x or greater, 0 if it's less than x. Only used to roll for the length of the track.
				"megaparsec speed" = "roll: 12" + "roll: 12" + "roll: 12" + ( ( 10 - 4 + "race length" ) / 10 ) * ( "roll: 12" ) + ( ( 10 - 5 + "race length" ) / 10 ) * "roll: 12"
				"syndicate speed" = "roll: 10" + "roll: 10" + "roll: 10" + ( ( 10 - 4 + "race length" ) / 10 ) * ( "roll: 10" ) + ( ( 10 - 5 + "race length" ) / 10 ) * "roll: 10"
				"delta speed" = "roll: 8" + "roll: 8" + "roll: 8" + ( ( 10 - 4 + "race length" ) / 10 ) * ( "roll: 8" ) + ( ( 10 - 5 + "race length" ) / 10 ) * "roll: 8"
				"deep speed" = "roll: 6" + "roll: 6" + "roll: 6" + ( ( 10 - 4 + "race length" ) / 10 ) * ( "roll: 6" ) + ( ( 10 - 5 + "race length" ) / 10 ) * "roll: 6"
				"syndicate laps" = "syndicate speed" + "syndicate boost"
				"delta laps" = "delta speed" + "delta boost"
				"deep laps" = "deep speed" + "deep boost"
			`	You board <ship> for the quick trip to the <racename>. Out the window, ${sunracer city to wilderness description}. Eventually, you park your ship outside the <racename>, and walk up to the racetrack's entrance.`
			label decisioning
			`	The screen above flashes race details:`
			`		<racename>: &[race length] Hour Race`
			``
			`		Today's Racers:`
			`		Megaparsec Racing Technologies: <megaparsec name>`
			`		Syndicate Performance Racing: <syndicate name>`
			`		Delta V Grand Prix: <delta name>`
			`		Deep Sky Dynamics: <deep name>`
			``
			choice
				`	(Watch the race.)`
					goto race
				`	(Ask someone for an overview of hover racing.)`
					to display
						not "hovercraft racing: talked to fan"
				`	(Use your ship to scan the racers.)`
					to display
						or
							"flagship attribute: outfit scan power" > 0
							"flagship attribute: tactical scan power" > 0
					goto scanner
			action
				set "hovercraft racing: talked to fan"
			`	Near the <racename>'s entrance, you spot a friendly figure ${sunracer fan tshirt}:`
			`	"Hovercraft racing pits four ships against the clock - each trying to log as many laps as possible. The race is between three and five hours long and is split into two phases: an initial afterburn for a burst of speed, followed by laps completed in the remaining time.`
			`	"Each racer has a roughly equal chance of victory, though Megaparsec Racing Technologies tends to win a bit more often overall. Megaparsec also excels in longer races thanks to their efficient ion engines that can do up to twelve laps an hour, but completely lack any initial speed burst. Deep racers shine on shorter stints by using high-powered atomics for a powerful start that can push them to complete up to eighteen laps in the first hour, but they tend to perform much worse in longer races due to their lack of efficiency. The other two teams fall somewhere in between.`
			`	"Even though each team is roughly equal, in a given race, a savvy watcher can better predict a winner by knowing which teams perform better on shorter or longer race lengths, or a less sporting one with a powerful scanner might even be able to tell a hovercraft's exact level of afterburner fuel before the race even begins.`
			`	"One last tip to remember - they say the surest way to make a small fortune in hovercraft racing is to start with a big one!" The fan's speech ends with a hearty laugh, whose sound mixes with the roar of engines inside the <racename>.`
			``
				goto decisioning
			label scanner
			`	Your ship is close enough to the <racename>'s track to be able to scan exactly how many laps each hovercraft's afterburner can take them. Your ship relays the following afterburner data:`
			``
			`		Megaparsec Racing Technologies: No afterburner fuel`
			`		Syndicate Performance Racing: &[syndicate boost] laps worth of afterburner fuel`
			`		Delta V Grand Prix: &[delta boost] laps worth of afterburner fuel`
			`		Deep Sky Dynamics: &[deep boost] laps worth of afterburner fuel`
			``
				goto decisioning
			label race
			action
				clear "sunracer race winner"
			`	${sunracer hovercraft race description}`
			branch megawon
				and
					"megaparsec speed" >= "syndicate laps"
					"megaparsec speed" >= "delta laps"
					"megaparsec speed" >= "deep laps"
			branch syndwon
				and
					"syndicate laps" >= "delta laps"
					"syndicate laps" >= "deep laps"
			branch deltwon
				"delta laps" >= "deep laps"
			action
				"sunracer race winner" = 4
				# maximum of other laps
				"second place" = "megaparsec speed"
				"second place" >?= "syndicate laps"
				"second place" >?= "delta laps"
				# minimum of other laps
				"last place" = "megaparsec speed"
				"last place" <?= "syndicate laps"
				"last place" <?= "delta laps"
				"second place margin" = "deep laps" - "second place"
			`	Deep Sky Dynamics <deep name> ${sunracer hovercraft victory description}`
				goto ending
			label deltwon
			action
				"sunracer race winner" = 3
				# maximum of other laps
				"second place" = "megaparsec speed"
				"second place" >?= "syndicate laps"
				"second place" >?= "deep laps"
				# minimum of other laps
				"last place" = "megaparsec speed"
				"last place" <?= "syndicate laps"
				"last place" <?= "deep laps"
				"second place margin" = "delta laps" - "second place"
			`	Delta V Grand Prix <delta name> ${sunracer hovercraft victory description}`
				goto ending
			label syndwon
			action
				"sunracer race winner" = 2
				# maximum of other laps
				"second place" = "megaparsec speed"
				"second place" >?= "deep laps"
				"second place" >?= "delta laps"
				# minimum of other laps
				"last place" = "megaparsec speed"
				"last place" <?= "deep laps"
				"last place" <?= "delta laps"
				"second place margin" = "syndicate laps" - "second place"
			`	Syndicate Performance Racing <syndicate name> ${sunracer hovercraft victory description}`
				goto ending
			label megawon
			action
				"sunracer race winner" = 1
				# maximum of other laps
				"second place" = "deep laps"
				"second place" >?= "syndicate laps"
				"second place" >?= "delta laps"
				# minimum of other laps
				"last place" = "deep laps"
				"last place" <?= "syndicate laps"
				"last place" <?= "delta laps"
				"second place margin" = "megaparsec speed" - "second place"
			`	Megaparsec Racing Technologies <megaparsec name> ${sunracer hovercraft victory description}`
			label ending
			action
				"last place margin" = "second place" - "last place"
			branch secondplaceten
				"second place margin" >= 10
			branch secondplacefour
				"second place margin" >= 4
			branch secondplacetwo
				"second place margin" >= 2
			branch secondplaceone
				"second place margin" >= 1
			# 2nd place margin of 0:happens in ~9% of races, 1:~16%, 2-3:~24%,4-9:~38%,10+:~12%
			`	They edge out the competition in a photo-finish, securing the win by a razor-thin margin.`
				goto endingmiddle
			label secondplaceone
			`	They clinch victory in a breathtaking display, only a single lap ahead of the field.`
				goto endingmiddle
			label secondplacetwo
			`	They rocket to an unrivaled lead in the race's last few minutes, ending the race with a clear, commanding advantage.`
				goto endingmiddle
			label secondplacefour
			`	They surge ahead, their craft a blur of power and precision, leaving rivals in their wake by multiple laps to finish the race in a clear victory.`
				goto endingmiddle
			label secondplaceten
			`	They dominate the competition with an astonishing double-digit lap lead to cross the finish line in an overwhelming triumph.`
			label endingmiddle
			branch lastplacefourteen
				"last place margin" >= 14
			branch lastplacenine
				"last place margin" >= 9
			branch lastplacesix
				"last place margin" >= 6
			branch lastplacethree
				"last place margin" >= 3
			# last place margin of 0-2:happens in ~8% of races, 3-5:~27%, 6-8:~28%,9-14:~29%,14+:~8%
			`	The other three teams bundle together, never separated by more than two laps in the last-minute sprint for second place.`
				goto trueending
			label lastplacethree
			`	The rest cluster together fairly tightly for an eventful end to the race.`
				goto trueending
			label lastplacesix
			`	The mid-field hovercraft finish the race in a loose grouping over half a dozen laps apart.`
				goto trueending
			label lastplacenine
			`	The remaining racers finish uneventfully spread out, the order stretched across close to a dozen laps.`
				goto trueending
			label lastplacefourteen
			`	Only three racers finish today: one crashed off the track, the driver lucky to escape unharmed.`
			label trueending
			`	${sunracer hovercraft victory exit}`
			`	Final results:`
			``
			`		Megaparsec Racing Technologies: <megaparsec name>, &[megaparsec speed] laps completed`
			`		Syndicate Performance Racing: <syndicate name>, &[syndicate laps] laps completed`
			`		Delta V Grand Prix: <delta name>, &[delta laps] laps completed`
			`		Deep Sky Dynamics: <deep name>, &[deep laps] laps completed`
			# The next line can be used when testing changes to the mission, but should remain commented out on the master branch.
			# `	2nd place: &[second place], margin: &[second place margin]; last place: &[last place], margin: &[last place margin]`
			``
			action
				clear "race length"
				clear "syndicate boost"
				clear "delta boost"
				clear "deep boost"
				clear "megaparsec speed"
				clear "syndicate speed"
				clear "delta speed"
				clear "deep speed"
				clear "syndicate laps"
				clear "delta laps"
				clear "deep laps"
				clear "second place"
				clear "last place"
				clear "second place margin"
				clear "last place margin"
				clear "hovercraft racing: talked to fan"
